/**
 *  自定义路由，用来完成项目当中的主体路由处理
 *  @author kangjx
 *  @date 2022/10/10
 */
import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'

//定义路由
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            // 默认打开的组件
            path: "",
            component: () => import('../views/Login.vue')
        },
        {
            path: "/home",
            component: () => import('../views/welcome/Home.vue')
        }
        , {
            path: '/sys/user/list',
            component: () => import('../views/sys/user/SysUser.vue'),
        }
        , {
            path: '/sys/user/add',
            name: 'add',
            component: () => import('../views/sys/user/addUser.vue')
        }



        // {
        //     path: "", //访问地址  不写为默认访问
        //     component: ()=>import('@/components/Login.vue')
        // },
        // {
        //     path: "/welcome", //页面路径
        //     component: ()=>import('@/components/Home.vue')
        // }
        // ,{
        //     path:'/avue'
        //     ,name:'avue'
        //     ,component:()=>import('@/page/demo/a.vue')
        // }
        // ,{
        //     path:'/bvue'
        //     ,name:'bvue'
        //     ,component:()=>import('@/page/demo/b.vue')
        // }
    ]
});


//导出router
export default router;